home *** CD-ROM | disk | FTP | other *** search
/ Internet.Works 39 / Issue 39.iso / pc / PCSoftware / AceHTML 4.0 / AceHTML4Pro.exe / %MAINDIR% / ScriptDef / Delayed Popup.sd < prev    next >
Encoding:
INI File  |  2000-08-31  |  1.0 KB  |  53 lines

  1. [SUBJECT]
  2. Description=Automatically opens a new popup window a given number of seconds after the page finishes loading
  3. ImageIndex=-1
  4. Folder=Quick JavaScript
  5.  
  6.  
  7. [HEAD_TEXT]
  8. ;<SCRIPT LANGUAGE="JavaScript">
  9. ;<!-- Begin
  10. ;closetime = 0; // Close window after __ number of seconds?
  11. ;// 0 = do not close, anything else = number of seconds
  12. ;
  13. ;function Start(URL, WIDTH, HEIGHT) {
  14. ;windowprops = "left=50,top=50,width=" + WIDTH + ",height=" + HEIGHT;
  15. ;preview = window.open(URL, "preview", windowprops);
  16. ;if (closetime) setTimeout("preview.close();", closetime*1000);
  17. ;}
  18. ;
  19. ;function doPopup() {
  20. ;url = "`URL`";
  21. ;width = `Width`;  // width of window in pixels
  22. ;height = `Height`; // height of window in pixels
  23. ;delay = `Delay`;    // time in seconds before popup opens
  24. ;timer = setTimeout("Start(url, width, height)", delay*1000);
  25. ;}
  26. ;//  End -->
  27. ;</script>
  28. ;
  29.  
  30. [BODY_TAG]
  31. ;OnLoad="doPopup();"
  32.  
  33.  
  34.  
  35. [`URL`]
  36. Kind=S
  37. Value=http://www.yahoo.com
  38.  
  39. [`Width`]
  40. Kind=S
  41. Value=250
  42.  
  43. [`Height`]
  44. Kind=S
  45. Value=150
  46.  
  47. [`Delay`]
  48. Kind=S
  49. Value=2
  50.  
  51.  
  52.  
  53.